package com.achao.utils;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @Author: achao
 * @DateTime: 2022/7/17 16:17
 * @Description: TODO
 */
public class ConnUtils {
    static {
        init();
    }


    private static void init() {
        Properties params = new Properties();
        String configFile = "conn_conf.properties";
        InputStream is = ConnUtils.class.getClassLoader().getResourceAsStream(configFile);
        try {
            params.load(is);
        } catch (IOException e) {
            e.printStackTrace();
        }

        ParamUtils.PORT = Integer.parseInt(params.getProperty("PORT"));
    }


}
